package com.emm.yixun.openapi.hander;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.emm.yixun.common.app.EditFollowReqDto;
import com.emm.yixun.common.app.EditFollowResDto;
import com.emm.yixun.common.exception.XFUNExceptionCode;
import com.emm.yixun.customer.service.app.CustomerServiceAppFacade;
import com.emm.yixun.openapi.dto.base.BaseRequestDTO;
import com.emm.yixun.openapi.dto.base.BaseResponseDTO;
import com.emm.yixun.openapi.hander.base.CommonAbstractHander;
import com.emm.yixun.openapi.vo.EditFollowReqVo;

/**
 * 更新客户跟进
 * @author Administrator
 *
 */
@Service("editFollowHander")
public class EditFollowHander extends CommonAbstractHander{
	
	@Autowired
	private CustomerServiceAppFacade customerServiceAppFacade;
	
	@SuppressWarnings("rawtypes")
	@Override
	public BaseResponseDTO doBusiness(BaseRequestDTO reqDto) {
		EditFollowReqVo req = (EditFollowReqVo)reqDto;
		EditFollowReqDto reqDto1 = req.getParams();
		BaseResponseDTO<EditFollowResDto> res = new BaseResponseDTO<EditFollowResDto>();
		EditFollowResDto resDto = new EditFollowResDto();
		try{
			resDto = customerServiceAppFacade.editFollow(reqDto1);
		} catch (Exception e) {
			resDto.setErrorCode(XFUNExceptionCode.UNKNOW_EXCEPTON.getCode());
			resDto.setErrorMsg(XFUNExceptionCode.UNKNOW_EXCEPTON.getDesout());
			resDto.setResult("0");
		}
		res.setResData(resDto);
		return res;
	}
	
}
